<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="半山腰总是挤的"/>
    <button type="button" @click="save">登录</button>
    <error-view/>
    <about-view/>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
import ErrorView from '@/views/ErrorView.vue'
import stu from '@/test/student'
import { age } from '@/test/teacher'
import AboutView from '@/views/AboutView.vue'

export default {
  name: 'HomeView',
  components: {
    AboutView,
    HelloWorld,
    ErrorView
  },
  data () {
    return {
      info: stu
    }
  },
  methods: {
    save () {
      sessionStorage.setItem('loginId', '1')
    }
  },
  created () {
    console.log(age)
  }
}
</script>
